package com.feiyu.universal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.feiyu.universal.dto.CommentDTO;
import com.feiyu.universal.entity.Comment;
import com.feiyu.universal.vo.CommentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tang ming
 * @since 2021-11-30
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    IPage<CommentVO> pageComment(IPage<Comment> page, @Param("param") CommentDTO param);

    IPage<CommentVO> managePage(Page<Comment> page, @Param("userId") Long userId,@Param("flag") Boolean flag);

    Boolean restoreComment(Long id);
}
